#ifndef THREAD_H
#define THREAD_H

#include <pthread.h>

class Thread {
public:
	Thread();
	virtual ~Thread();
	int start();
	void join();
	void cancel();
	
protected:
	static void *entry(void* pArg);
	int run();
	virtual void setup();
	virtual void execute();

private:
	pthread_t mThread;
	
};

#endif
